For more efficient data retrieval, most databases maintain indexes that summarize the contents of underlying base tables. One technique is to maintain the index synchronously with the column on which the index is built. In this technique, changes to a base table column made by data manipulation operations, such as insert, update, etc., (sometimes referred to as DMLs) are propagated to the index at the time when the column is updated. However, depending on the data, the time it takes to update the index can be significant.
Therefore, another technique is to maintain the index asynchronously. That is, changes to a column are not propagated to its corresponding index at the time of a DML. Instead, they are batched and propagated to the index at a later time. For example, the index can be “synced” with the indexed column either at the time of commit of the transaction that performed the DMLs, or it can be performed by a background scheduler job at a periodic interval, etc.
Thus, the asynchronously maintained index and its base table are not necessarily in a consistent state at all points. Consequently, if a query is to be executed against the index, the results of executing the query against the index may not reflect the state of the base table.
Therefore, improved techniques are desired for handling queries to indexes that are asynchronously updated.
The approaches described in this section are approaches that could be pursued, but not necessarily approaches that have been previously conceived or pursued. Therefore, unless otherwise indicated, it should not be assumed that any of the approaches described in this section qualify as prior art merely by virtue of their inclusion in this section.